let alertType = {
  Observe_exception: 1 << 7,
  Liquid: 1 << 6,
  Room: 1 << 5,
  DO: 1 << 4,
  pH: 1 << 3,
  TEMP: 1 << 2,
  LOWER: 1 << 1,
  HIGHER: 1 << 0,
}
let alertText={
  Observe_exception: '观察异常',
  Liquid: '培养液',
  Room: '培养室',
  DO: 'DO',
  pH: 'pH',
  TEMP: '温度',
  LOWER: '过低',
  HIGHER: '过高',
}

let num = 74;
function select(num) {
  console.log('取余后的值:' + num);
}

let alertString='';
for (const key in alertType) {
  console.log('key='+key);
  if (Object.prototype.hasOwnProperty.call(alertType,key)) {
    const element = alertType[key];
    // console.log(element);
    if ((num & element) === element) {
      console.log(element);
      alertString+=alertText[key];
    }
  }
}
console.log('最终结果:'+alertString);
